<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>项目管理</title>
	<meta name="decorator" content="default"/>
	
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/projectdemo/projectapply/">服务器申请列表</a></li>
		<shiro:hasPermission name="projectdemo:projectapply:edit"><li><a href="${ctx}/projectdemo/projectapply/form">服务器申请添加</a></li></shiro:hasPermission>
	</ul>
	<form:form modelAttribute="aaa" id="searchForm"  action="${ctx}/projectdemo/projectapply/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>项目名称：</label>
			<form:input path="name" htmlEscape="false" maxlength="32" class="input-medium"/>
			</li>
			<li><label>审核状态：</label>
			<form:select path="status" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('project_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
			</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>项目名称</th>
				<th>项目英文名缩写</th>
				<th>项目经理</th>
				<th>服务器类型</th>
				<th>开始时间</th>
				<th>结束时间</th>
				<th>项目描述</th>
				<th>状态</th>
				<th>审核信息</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="project">
			<tr>
				<td>
				<a href="${ctx}/projectdemo/projectapply/formId?id=${project.id}">
					${project.name}
				</a>
				</td>
				<td>
					${project.abbreviation}
				</td>
				<td>
					${project.manager}
				</td>
				<td>
				<c:forEach items="${project.typeList}" var="type">
					${type}
				</c:forEach>
				</td>
				<td>
					<fmt:formatDate value="${project.starttime}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${project.endtime}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					${project.describe}
				</td>
				<td id="status">
					${fns:getDictLabel(project.status, 'project_status', '')}
				</td>
				<td>
					${project.approval}
				</td>
				<td id="tds">
				<c:if test="${project.status==0}">
				<shiro:hasPermission name="projectdemo:projectapply:edit">
    				<a href="${ctx}/projectdemo/projectapply/form?id=${project.id}">修改</a>
					<a href="${ctx}/projectdemo/projectapply/delete?id=${project.id}" onclick="return confirmx('确认要删除该项目吗？', this.href)">删除</a>
				</shiro:hasPermission>
				</c:if>
				<c:if test="${project.status!=0}">
				   	<a href="${ctx}/projectdemo/serverinformation/formInf?projectid=${project.id}&name=${project.name}&status=${project.status}&typeidList=${project.typeidList}">查看审核信息</a>
				</c:if>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>